<div class="bjui-pageContent">
    <form action="{:U('save_nav')}" data-callback="dialogFormCall" data-toggle="validate" data-alertmsg="false" class="dialogForm">
        <input type="hidden" name="id" value="{$va.id}"/>
        <div class="form-group">
            <label class="x100">所属导航:</label>
            <select name="parent_id" data-toggle="selectpicker" class="sel-nav">
                <option value="0">一级导航栏--</option>
                <volist name="res" id="ro">
                   <option value="{$ro['id']}" <if condition="$ro['id'] eq $va['parent_id']">selected</if>>{$ro.name}</option>
                </volist>
            </select>
        </div>
        <div class="form-group">
            <label class="x100">导航名称:</label>
            <input type="text" name="name" data-rule="required" class="nav-name "  value="{$va.name}"/>
        </div>
        <div class="form-group">
            <label class="x100">链接:</label>
            <input type="text" name="url" data-rule="required;url" class="w400 nav-link" value="{$va.url}"/>
            <span class="text-warning">注:请填写具体的地址</span>
        </div>
        
        <div class="form-group">
            <label class="x100">是否新窗口:</label>
            <input type="radio" name="is_blank" value="1" id="firend_newwin" data-toggle="icheck" data-label="是"  <if condition="$va.is_blank eq '1'">checked</if>  />
            <input type="radio" name="is_blank" value="0" id="firend_newwin" data-toggle="icheck" data-label="否"  <if condition="$va.is_blank neq '1'">checked</if> />
        </div>
        <div class="form-group">
            <label class="x100">状态:</label>
            <input type="radio" name="status" value="0" id="firend_status" data-toggle="icheck" data-label="显示"  <if condition="$va.status neq '1'">checked</if>  />
            <input type="radio" name="status" value="1" id="firend_status" data-toggle="icheck" data-label="不显示"  <if condition="$va.status eq '1'">checked</if> />
        </div>
        <div class="form-group">
            <label class="x100">权重:</label>
            <input type="text" name="sort" data-toggle="spinner" data-min="0" data-step="1" data-rule="integer" class="w100 nav-weight"  value="{$va['sort']?$va['sort']:'1'}"/>
        </div>
    </form>
</div>
<script>
    $(function () {
       /* $('.sel-nav').selectpicker().change(function () {
           var name = $(this).find('option:checked').text(),
               link = $(this).val(),
               weight = $(this).find('option:checked').attr('data-weight');
           $('.nav-name').val(name);
           $('.nav-link').val(link);
           $('.nav-weight').val(weight);
       }); */
    });
</script>
<include file="Common/footer" ftype="save" />